package api

import (
	"github.com/labstack/echo/v4"
	"longmen/server/pkg/common/helper/util"
	"longmen/server/pkg/db/mysql/db_main"
)

// @Summary 友链列表
// @Description 友链列表
// @Accept  json
// @Produce  json
// @Tags Links
// @Success 200 {object} models_main.Links "result"
// @Router /api/links/getLinksList [POST]
func (base *Controller) GetLinks(c echo.Context) error {
	resp, err := db_main.GetLinks()
	if err != nil {
		return util.BuildFail(c, 1, "", err)
	}
	return util.BuildSuccess(c, resp, "")
}
